  // JS实现选项卡切换
window.onload = function() {
    var oUl1 = document.getElementById("ul1");
    var aLi = oUl1.getElementsByTagName("li");
    var oDiv = document.getElementById("tab-list");

    for(var i = 0; i < aLi.length; i++) {
        aLi[i].index = i;
        aLi[i].onclick = function() {
            for(var i = 0; i < aLi.length; i++) {
                aLi[i].className = "";
            }
            
            this.className = "active";
            
            var x=document.getElementById("dv_changyan");
            if(x!=null){
                x.className='hide';
            } 
            x=document.getElementById("dv_disqus");
            if(x!=null){
                x.className='hide';
            }
            x=document.getElementById("dv_gitment");
            if(x!=null){
                x.className='hide';
            }
            x=document.getElementById("dv_vment");
            if(x!=null){
                x.className='hide';
            }
            switch(this.id){
                case "changyan": /*畅言*/
                   document.getElementById("dv_changyan").className='show';
                    break;
                case "disquss": /*disqus*/
                    document.getElementById("dv_disqus").className='show';
                    break;
                case "gittalk": /*gitment*/
                    document.getElementById("dv_gitment").className='show';
                    break;
                case "valine": /*val*/
                    document.getElementById("dv_vment").className='show';
                    break;
            }
        }        
    }

}